package com.ruoyi.sys.safetytraining.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.safetytraining.mapper.TbSafetyTrainingMapper;
import com.ruoyi.sys.safetytraining.domain.TbSafetyTraining;
import com.ruoyi.sys.safetytraining.service.ITbSafetyTrainingService;

/**
 * 培训学习Service业务层处理
 * 
 * @author iuxin
 * @date 2022-05-25
 */
@Service
public class TbSafetyTrainingServiceImpl implements ITbSafetyTrainingService 
{
    @Autowired
    private TbSafetyTrainingMapper tbSafetyTrainingMapper;

    /**
     * 查询培训学习
     * 
     * @param stId 培训学习主键
     * @return 培训学习
     */
    @Override
    public TbSafetyTraining selectTbSafetyTrainingByStId(Long stId)
    {
        return tbSafetyTrainingMapper.selectTbSafetyTrainingByStId(stId);
    }

    /**
     * 查询培训学习列表
     * 
     * @param tbSafetyTraining 培训学习
     * @return 培训学习
     */
    @Override
    public List<TbSafetyTraining> selectTbSafetyTrainingList(TbSafetyTraining tbSafetyTraining)
    {
        return tbSafetyTrainingMapper.selectTbSafetyTrainingList(tbSafetyTraining);
    }

    /**
     * 新增培训学习
     * 
     * @param tbSafetyTraining 培训学习
     * @return 结果
     */
    @Override
    public int insertTbSafetyTraining(TbSafetyTraining tbSafetyTraining)
    {
        return tbSafetyTrainingMapper.insertTbSafetyTraining(tbSafetyTraining);
    }

    /**
     * 修改培训学习
     * 
     * @param tbSafetyTraining 培训学习
     * @return 结果
     */
    @Override
    public int updateTbSafetyTraining(TbSafetyTraining tbSafetyTraining)
    {
        return tbSafetyTrainingMapper.updateTbSafetyTraining(tbSafetyTraining);
    }

    /**
     * 批量删除培训学习
     * 
     * @param stIds 需要删除的培训学习主键
     * @return 结果
     */
    @Override
    public int deleteTbSafetyTrainingByStIds(Long[] stIds)
    {
        return tbSafetyTrainingMapper.deleteTbSafetyTrainingByStIds(stIds);
    }

    /**
     * 删除培训学习信息
     * 
     * @param stId 培训学习主键
     * @return 结果
     */
    @Override
    public int deleteTbSafetyTrainingByStId(Long stId)
    {
        return tbSafetyTrainingMapper.deleteTbSafetyTrainingByStId(stId);
    }
}
